.external-link {
  &::after {
    content: "\00a0";
    background-image: url(../img/icons/arrow-up-right.svg);
    background-repeat: no-repeat;
    display: inline-block;
    background-size: 16px; // changed from 15px
    padding: 0 4px 0 8px;
    width: 16px; // changed from 14px
    height: 16px; // added this line
    background-position: center; // changed this line
    transition: transform 100ms ease-in-out; // changed from background-position
    // Note: the background position is based on the padding, so it might
    // need adjustments for elements with more padding to make it line up
    // with the text. I thought background-origin: content-box might fix this
    // but it doesn't seem to.
  }

  &:hover::after {
    transform: translate(3px, -3px); // Translate the arrow up and to the right
  }

  .fa-external-link {
    display: none;
  }
}

.top-nav .dropdown .external-link,
.xrpl-footer .external-link {
  &::after {
    background-position: left 6px bottom 1px;
    width: 2rem;

    @-moz-document url-prefix() {
      @supports (animation: calc(0s)) {
        // Firefox's alignment of the SVG is 1 pixel lower than Chrome's,
        // so this rule fixes that.
        background-position: left 8px bottom 2px;
      }
    }
  }

  &:hover::after {
    background-position: left 8px bottom 3px;
  }
}

.q-wrapper .external-link {
  &::after {
    background-position: left 0 bottom 7px;
  }
  &:hover::after {
    background-position: left 4px bottom 11px;
  }
}

.li-links {
  position: relative;
  border-bottom: 2px solid $gray-600;
  a {
    width: 100%;
    padding: 16px 0;
    &::after {
      position: absolute;
      right: 4px;
      content: "\00a0";
      background-image: url(../img/icons/arrow-up-right.svg);
      background-repeat: no-repeat;
      display: inline-block;
      background-size: 1.5rem;
      padding: 0 .5rem;
      background-position: left 0 bottom -.1rem;
      transition: background-position 100ms ease-in-out;
    }
    &:hover::after {
      background-position: left .2rem bottom .1rem;
    }
  }
}
